package com.feicheng.persistence.service.impl;

import com.feicheng.persistence.entity.Product;
import com.feicheng.persistence.mapper.ProductMapper;
import com.feicheng.persistence.model.ProductPagePojo;
import com.feicheng.persistence.service.IProductService;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author cailongyang
 * @since 2022-01-10
 */
@Service
public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> implements IProductService {

	@Override
	public Page<ProductPagePojo> getProductsByPage(IPage<ProductPagePojo> page, Wrapper wrapper) {
		
		return this.getBaseMapper().selectProductsByPage(page, wrapper);
	}
	
	@Override
	public Integer[] selectLevelNum(Wrapper wrapper) {
		return this.getBaseMapper().selectLevelNum(wrapper);
	}
	
}
